//
// Created by 吴锐 on 2022/3/1.
//

#include "iostream"
#include "string"

using namespace std;

void test01(){
    string s = "abcdef";

    string subStr = s.substr(1, 3);

    cout << "subStr = " << subStr << endl;
}

void test02(){
    string email = "zhangsan@sina.com";
    int index = email.find("@");
    string username = email.substr(0, index);
}

int main(){
    test01();
    return 0;
}